package gx.service;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import gx.dao.SaleDao;
import gx.entity.Sale;
import gx.entity.common.Page;
import gx.service.common.BaseService;


@Service
public class SaleService extends BaseService<Sale> {
	private SaleDao saleDao;

	public SaleDao getSaleDao() {
		return saleDao;
	}

	@Autowired
	public void setSaleDao(SaleDao saleDao) {
		this.saleDao = saleDao;
		super.setDao(this.saleDao);
	}
	
	public Page<Sale> findByStatus(int size, int number, Integer... status){
		return saleDao.findByStatus(size, number, status);
		
	}

	public Page<Sale> findByCriteria(int size, int number, DetachedCriteria dc, DetachedCriteria dc2,DetachedCriteria dc3) {
		return saleDao.findByCriteria(size,number,dc,dc2,dc3);
	}
	
}
